package com.nineyang.bean;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/*
 绑定第三方库的bean，假设AppBean2是第三方库提供的bean
 1.新建一个配置配置类
 2.提供一个返回值是AppBean2的方法
 3.为该方法添加@Bean注解以及@ConfigurationProperties注解
 */
public class AppBean2 {

    private Address[] addresses1;
    private List<Address> addresses2;
    private Map<String,Address> addresses3;

    @Override
    public String toString() {
        return "AppBean{" +
                "addresses1=" + Arrays.toString(addresses1) +
                ", addresses2=" + addresses2 +
                ", addresses3=" + addresses3 +
                '}';
    }

    public void setAddresses1(Address[] addresses1) {
        this.addresses1 = addresses1;
    }

    public void setAddresses2(List<Address> addresses2) {
        this.addresses2 = addresses2;
    }

    public void setAddresses3(Map<String, Address> addresses3) {
        this.addresses3 = addresses3;
    }
}
